<?php 

if(!isset($page)) $page = 'home'; 

if( true == $this->session->userdata('admin_logged') )
{

?>

<div id='menu_line' class='menu_line'>
	<div id="menu_items" class="menu_items">
        
        <ul class="admin_menu">
            <li>
                <a href='<?=LINK_URL?>home' class="menu_item<?php if($menu_page=="home")echo " current"; ?>"><img src="<?php echo base_url();?>img/icons/Dashboard.png"/> <?php echo lang('dashboard');?></a>
            </li>
            
            <li><a href='<?=LINK_URL?>users' class="menu_item<?php if($menu_page=="users")echo " current"; ?>" ><img src="<?php echo base_url();?>img/icons/User group.png"/> <?php echo lang('users');?></a>
              <ul>
                <li><a href='<?=LINK_URL?>users/online' class="menu_item<?php if($menu_page=="users")echo " current"; ?>" ><?php echo lang('users_online');?></a></li>
                <li><a href='<?=LINK_URL?>users/all_users' class="menu_item<?php if($menu_page=="users")echo " current"; ?>" ><?php echo lang('users_all');?></a></li>
                <li><a href='<?=LINK_URL?>users/moderation_users' class="menu_item<?php if($menu_page=="users")echo " current"; ?>" ><?php echo lang('users_fake');?></a></li>
              </ul>
            </li>
            
            <li><a href='<?=LINK_URL?>moderators' class="menu_item<?php if($menu_page=="moderators")echo " current"; ?>"><img src="<?php echo base_url();?>img/icons/User.png"/> <?php echo lang('moderators');?></a>
                 <ul>
                    <li><a href='<?=LINK_URL?>moderators/teams' ><?php echo lang('modearator_teams');?></a></li>
                    <li><a href='<?=LINK_URL?>moderators/activity' ><?php echo lang('moderator_activity');?></a></li>
                  </ul>
            </li>
            <li><a href='<?=LINK_URL?>dialogs' class="menu_item<?php if($menu_page=="dialogs")echo " current"; ?>"><img src="<?php echo base_url();?>img/icons/Comments.png"/> <?php echo lang('dialogs');?></a>
            </li>
            
            <li><a href='<?=LINK_URL?>monitor' class="menu_item<?php if($menu_page=="monitor")echo " current"; ?>"><img src="<?php echo base_url();?>img/icons/Monitor.png"/> <?php echo lang('monitor');?></a>
            </li>
            
             <li><a href='<?=LINK_URL?>newsletter' class="menu_item<?php if($menu_page=="newsletter")echo " current"; ?>"><img src="<?php echo base_url();?>img/icons/Mail.png"/> <?php echo lang('newsletter');?></a>  
            </li>
            
            <li><a href='<?=LINK_URL?>support' class="menu_item<?php if($menu_page=="support")echo " current"; ?>"><img src="<?php echo base_url();?>img/icons/Help.png"/> <?php echo lang('support');?></a>                 
            </li>
            
            <li><a href='<?=LINK_URL?>billing' class="menu_item<?php if($menu_page=="billing")echo " current"; ?>"><img src="<?php echo base_url();?>img/icons/Euro.png"/> <?php echo lang('billing');?></a>                 
            </li>
            
            <li><a href='<?=LINK_URL?>statistic' class="menu_item<?php if($menu_page=="statistic")echo " current"; ?>"><img src="<?php echo base_url();?>img/icons/Statistics.png"/> <?php echo lang('statistic');?></a>
            </li>
            <!--
            <li><a href='<?=LINK_URL?>affiliate' class="menu_item<?php if($menu_page=="affiliate")echo " current"; ?>"><img src="<?php echo base_url();?>img/icons/Diagram.png"/> <?php echo lang('affiliate');?></a>
            </li>-->
            <li><a href='<?=LINK_URL?>promotions' class="menu_item<?php if($menu_page=="promotions")echo " current"; ?>"><img src="<?php echo base_url();?>img/icons/Open letter.png"/> <?php echo lang('promotions');?></a>
            </li>
            
        </ul>
        
        
        <a style='float:right; margin-left: 10px;' href='<?=LINK_URL?>login/logout' class="menu_item logout" title="<?=lang('logout')?>"><img src="<?php echo base_url();?>img/icons/Exit.png"/> </a>
        <a style='float:right; margin-right: 10px;' href='<?=base_url()?>' target="_blank" class="menu_item"><img src="<?php echo base_url();?>img/icons/Online.png"/> <?php echo lang('view_site');?></a>
	</div>
</div>

  <div id="contents" class='contents'>
    <div class="right">
      <label><?php $sel_lang = $this->session->userdata('admin_lang'); echo lang('language'); ?>:</label>
      <select name="change_lang" id="change_lang" class="text ui-widget-content ui-corner-all" >
        <option value="en" <?php echo ($sel_lang=='en')?"selected='selected'":"";  ?> >English</option>
        <option value="de" <?php echo ($sel_lang=='de')?"selected='selected'":"";  ?> >Deutsch</option>
        
      </select>
       
    </div>
    <br/>
    <br/>
    
     <div class="right ">
       <div class="num_online">
       <span><?php echo lang('online'); ?>:</span> <span id="num_online" style="color:red;" >  </span>
       <br/>
       <span id="num_users_online" >  </span> <?php echo lang('user_s'); ?>     
       <br/>
       <span id="num_moderators" >  </span> <span style="text-transform: lowercase;"><?php echo lang('moderators');?></span> 
       </div>
    </div> 
    
    
    
<?php } else { ?>
<div id="contents" class='contents'>
    
<?php } ?>